<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
 <head>
  <title>inputEx - RTEField Usage</title>

<!-- YUI CSS -->
<link rel="stylesheet" type="text/css" href="../lib/yui/reset-fonts/reset-fonts.css">
<link rel="stylesheet" type="text/css" href="../lib/yui/container/assets/container.css"> 
<link rel="stylesheet" type="text/css" href="../lib/yui/assets/skins/sam/skin.css">

<!-- InputEx CSS -->
<link type='text/css' rel='stylesheet' href='../css/inputEx.css' />

<!-- Demo CSS -->
<link rel="stylesheet" type="text/css" href="css/demo.css"/>
<link rel="stylesheet" type="text/css" href="css/dpSyntaxHighlighter.css">

 </head>

<body class="yui-skin-sam">

<h1>inputEx - RTEField Usage</h1>


<!-- Example 1 -->
<div class='exampleDiv'>
	<h2>Basic RTEField creation</h2>
	<p>Use the following code to create a basic inputEx RTEField.</p>
	<div class='demoContainer' id='container1'></div>
	<div class='codeContainer'>
		<textarea name="code" class="JScript">
			new inputEx.RTEField({parentEl: 'container1', name: 'rteField',value:"I'm the default value. I've been set through the value option."});
		</textarea>
	</div>
</div>


<!-- Example 2 -->
<div class='exampleDiv'>
	<h2>RTEField setValue/getValue</h2>
	<p>Test for setValue/getValue using the RTEField.</p>
	<div class='demoContainer' id='container2'></div>
	<div class='codeContainer'>
		<textarea name="code" class="JScript">
			var div = YAHOO.util.Dom.get('container2');
			var htmlField = new inputEx.RTEField({parentEl: div, name: 'test2'});

			var button1 = inputEx.cn('button', null, null, "SetValue");
			div.appendChild(button1);
			YAHOO.util.Event.addListener(button1, "click" ,function() { 
				htmlField.setValue('RTEField can contain HTML !'); 
			});
			var button2 = inputEx.cn('button', null, null, "GetValue");
			div.appendChild(button2);
			YAHOO.util.Event.addListener(button2, "click" ,function() { 
				alert(htmlField.getValue());
			});
		</textarea>
	</div>
</div>


<!-- Example 3 -->
<div class='exampleDiv'>
	<h2>Using the SimpleEditor</h2>
	<p>Use the following code to create a SimpleEditor widget</p>
	<div class='demoContainer' id='container3'></div>
	<div class='codeContainer'>
		<textarea name="code" class="JScript">
			var field3 = new inputEx.RTEField({parentEl: 'container3', name: 'rteField3', editorType: 'simple'});
			field3.setValue("Value set just after init...");
		</textarea>
	</div>
</div>


<!-- YUI Library -->
<script type="text/javascript" src="../lib/yui/utilities/utilities.js"></script>
<script type="text/javascript" src="../lib/yui/container/container-min.js"></script>


<!-- YUI For the  Rich text editor -->
<script type="text/javascript" src="../lib/yui/element/element-min.js"></script> 
<script src="../lib/yui/menu/menu-min.js"></script>
<script src="../lib/yui/button/button-min.js"></script>
<script src="../lib/yui/editor/editor-min.js"></script>


<!-- InputEx -->
<script src="../js/inputex.js"  type='text/javascript'></script>
<script src="../js/Field.js"  type='text/javascript'></script>
<script src="../js/fields/RTEField.js"  type='text/javascript'></script>

<!-- inputEx examples -->
<script src="js/dpSyntaxHighlighter.js"></script>
<script src="inputex-examples.js"></script>

 </body>
</html>